package com.imau.bean;

import com.imau.common.utils.IdWorkerGen;
import io.mybatis.provider.Entity;
import lombok.Data;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

@Entity.Table("t_role")
@Data
public class Role implements Serializable {

    @Entity.Transient
    private static final long serialVersionUID = 594829320797158219L;

    /**
     *角色Id
     */
    @Entity.Column(id = true ,genId = IdWorkerGen.class, updatable = false)
    private String id;
    /**
     * 角色名
     */
    private String name;
    /**
     * 说明
     */
    private String description;


   // private Set<User> users = new HashSet<User>(0); //角色与用户多对多
   @Entity.Transient
   private Set<Permission> permissions = new HashSet<Permission>(0);//角色与模块  多对多
}